home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / toolalias / toolalias.doc < prev    next >
Text File  |  1995-03-27  |  5KB  |  126 lines

  1. short: substitute loadseg'd programs with others
  2.  
  3.                               ToolAlias v1.02
  4.                               ---------------
  5.                      PUBLIC DOMAIN BY Martin W. Scott
  6.                NO WARRANTIES ATTACHED - USE AT YOUR OWN RISK
  7.                           RELEASED FEBRUARY 1993
  8.  
  9.                 ToolAlias requires AmigaDos 2.0 or higher.
  10.  
  11. ToolAlias  provides  a  mechanism  for rerouting specific programs to other
  12. programs.  For example, with ToolAlias, you could reroute all references to
  13. ':c/muchmore'  to use instead 'sys:utilities/ppmore', so that when browsing
  14. documents on a Fish disk, you get to use your favourite text viewer, rather
  15. than loading the one specified in the document's ToolTypes.
  16.  
  17. I  take  no credit for this idea:  I got it from a program called Replex by
  18. Ekke  Verheul,  that  appeared  on a recent fish disk.  That program was as
  19. good  as  this incarnation, except that the method of patching the AmigaDos
  20. LoadSeg routine caused software failures when (blink-created) overlays were
  21. loaded.   Since  one  of  the  programs  I  use  a  lot (Yak) utilised such
  22. overlays, Replex was unusable on my system.  But I really liked the idea.
  23.  
  24. So,  now  the  instructions.   ToolAlias is implemented as a commodity that
  25. should  be  started  by  dropping its icon into your WBStartup drawer.  The
  26. DONOTWAIT  ToolType  should  therefore  be  set;  the  standard Commodities
  27. ToolTypes  may  also  be  used,  to modify ToolAlias's HotKey and determine
  28. whether or not the settings window opens on startup.
  29.  
  30. The standard Commodities ToolTypes are:
  31.  
  32. Name        Default        Description
  33. -------------------------------------------------------------------------
  34. CX_PRIORITY    0        Commodity priority.
  35. CX_POPUP    TRUE        Whether to show window on startup.
  36. CX_POPKEY    control alt t    Key to open/show settings window.
  37.  
  38. The  settings  window may be opened at startup, or more usually by pressing
  39. the  HotKey  (or  using the Exchange).  The window has a number of gadgets,
  40. whose use should be fairly obvious; the descriptions are:
  41.  
  42.     Old    The old name to be substituted
  43.     New    The new name to replace the old name
  44.  
  45.     <<    Move to start of list of substitutions
  46.     <    Move to previous member in list
  47.     Add    Add a new entry after the current member
  48.     Del    Delete current member
  49.     >    Move to next member in list
  50.     >>    Move to end of list of substitutions
  51.  
  52.     Save    Save current configuration (and close window)
  53.     Load    Restore last-saved configuration
  54.     Use    Use current configuration (and close window)
  55.     Quit    Terminate ToolAlias, removing patches        
  56.  
  57. The   configuration   is  saved  to  the  file  's:ToolAlias.config'.
  58.  
  59.  
  60. (slightly) Technical Details
  61. ----------------------------
  62. The  system  LoadSeg  routine  is  patched, and a list of all substitutions
  63. kept.   When  a program calls LoadSeg with a name, the patch first searches
  64. it's  list  for  a  matching  name,  and  if  found, calls LoadSeg with the
  65. corresponding new name. When names are compared, case is insignigicant.
  66.  
  67. Heres an example list:
  68.  
  69.     old    :c/less
  70.     new    ppmore
  71.  
  72.     old    :c/muchmore
  73.     new    ppmore
  74.  
  75.     old    :c/xicon
  76.     new     c:xicon
  77.  
  78.     old    :c/iconx
  79.     new    c:iconx
  80.  
  81. This  list  would  enable  you  to  browse  Fish disks while using your own
  82. preferred text viewer (in this example ppmore), and the Workbench scripting
  83. programs from your own C:  directory (which may be on a hard-disk, sppeding
  84. things  up).   I  should  stress  that  names  must  match  exactly  to  be
  85. substituted;  with the above list, a default tool of 'muchmore' wouldn't be
  86. substituted with another name as it doesn't match any of the 'old' names.
  87.  
  88. I  have  to be honest and say I can't think of any uses for ToolAlias other
  89. than  circumventing default tool types with your own preferences, but since
  90. I get a lot of PD stuff and magazine coverdisks, I find it useful.
  91.  
  92.  
  93. History
  94. -------
  95.  v1.02    - enforcer-hit removed.
  96.  
  97.     - cache-friendly patching now used.
  98.  
  99.  v1.01    - initial release.
  100.  
  101.  
  102. Distribution
  103. ------------
  104. As  with  all  my programs, ToolAlias is freeware, though I'm not averse to
  105. receiving contributions should you feel the need to send them.  Source in C
  106. is  included,  and  compiles  with  SAS/C  v5.10.   ToolAlias comes with no
  107. warranties,   and  any  loss  or  damage  arising  from  it's  use  is  the
  108. responsibility of the user, you, not the programmer, me.  This isn't to say
  109. that I think it will crash your system (in fact I'm pretty sure it won't).
  110.  
  111. You  may contact me with comments, suggestions, bug-reports, cash, etc.  by
  112. postal mail at:
  113.  
  114.     Martin W. Scott
  115.     23 Drum Brae North
  116.     Edinburgh  EH4 8AT
  117.     United Kingdom
  118.  
  119. or by email until Summer 1993 at:
  120.  
  121.     mws@castle.ed.ac.uk
  122.  
  123. Enjoy,
  124.  
  125.     Martin.
  126.